package com.leshan.lwm2m.init;

import com.leshan.lwm2m.server.ServerBuild;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author pengyu
 * @Date 2019/9/16
 * @Description
 */
@Component
public class ServerInit implements ApplicationRunner {

    private  Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private ServerBuild  serverBuild;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        logger.info("================initServer==============");

        serverBuild.initServer();


    }
}
